
var CryptoJS = require('crypto-js');
t = "/api/search/searchmulti"
data = {
    "searchKey": "科技",
    "pageIndex": 2,
    "pageSize": 20
}

var a = {
    "0": "W",
    "1": "l",
    "2": "k",
    "3": "B",
    "4": "Q",
    "5": "g",
    "6": "f",
    "7": "i",
    "8": "i",
    "9": "r",
    "10": "v",
    "11": "6",
    "12": "A",
    "13": "K",
    "14": "N",
    "15": "k",
    "16": "4",
    "17": "L",
    "18": "1",
    "19": "8"
}

sha512 = function (a,b){
    return CryptoJS.HmacSHA512(a + b).toString()
}


fn22 = function() {
    for (var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "/").toLowerCase(), t = e + e, n = "", i = 0; i < t.length; ++i) {
        var o = t[i].charCodeAt() % 20;
        n += a[o]
    }
    return n
}

fn1 = function() {
                var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
                  , t = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "/").toLowerCase()
                  , n = JSON.stringify(e).toLowerCase();
                return sha512(t + n, fn22(t)).toLowerCase().substr(8, 20)
            }

console.log(fn1(t,data))

// 5cd81adabb280e188c00
// bfca01659a2ffbdf651b
